#!/bin/sh
cd /tmp/install/
/bin/tar xfz update.tar.gz >/dev/null 2>&1
cd lib/modules/
for i in `ls -d 2.6.5-7.191*`
do
   if [ ! -d /lib/modules/${i} ] ; then
      continue
   fi

   if [ ! -f /boot/System.map-${i} ] ; then
      continue
   fi

   cp -f ${i}/kernel/drivers/scsi/si3132r5.ko /lib/modules/${i}/kernel/drivers/scsi/ >/dev/null 2>&1
   echo -n "."

   rm -f /lib/modules/${i}/kernel/drivers/scsi/.ko >/dev/null 2>&1

   depmod -a -F /boot/System.map-${i} ${i} >/dev/null 2>&1
   echo -n "."

done

if [ "" != "" ];then
    sed -e '/INITRD_MODULES/s///' /etc/sysconfig/kernel > /tmp/kernel.0
else
    cat /etc/sysconfig/kernel > /tmp/kernel.0
fi
sed -e '/INITRD_MODULES/s/"/ si3132r5"/2' /tmp/kernel.0 > /tmp/kernel.1
mv -f /tmp/kernel.1 /etc/sysconfig/kernel

rm -rf /tmp/install/lib
